﻿@model SnippetBox.Web.Areas.Manage.Models.SnippetModel
    <h3 class="formGroupHeader">Snippet</h3>
    <div class="formRow clearfix last">
        @Html.TextBoxFor(model => model.Snippet.Title, new { @class = "largeTextbox", placeholder = "Title" })
        @Html.ValidationMessageFor(model => model.Snippet.Title)
    </div>     
    
    <div class="formRow clearfix last">
		<div id="wmd-editor" class="wmd-panel"> 
			<div id="wmd-button-bar"></div> 
            @Html.TextAreaFor(model => model.Snippet.BodyRaw, new { @class = "markdownEditor", placeholder = "Write your snippet here" })
            @Html.ValidationMessageFor(model => model.Snippet.BodyRaw)
		</div> 
    </div>

    <h3 class="formGroupHeader">Category</h3>
    <div class="formRow clearfix last">
        @Html.DropDownListFor(model => model.CategoryId, Model.CategoryList, "- Choose category -")
        @Html.ValidationMessageFor(model => model.CategoryId)
    </div>   


    <h3 class="formGroupHeader">Preview</h3>
	
    <div id="wmd-preview" class="wmd-panel"></div> 

    
    <link href="/Assets/Scripts/lib/wmd/wmd.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="@Url.Content("~/assets/scripts/lib/wmd/wmd.js")"></script>    <script type="text/javascript" src="@Url.Content("~/assets/scripts/lib/wmd/showdown.js")"></script>    <script type="text/javascript">
        snippetBox.markup.editor();    </script>